package api;

/**
 * @Author admin
 * @Date 2019/3/27 11:08
 */
public class RuntimeTest {
    public static void main(String[] args) {
// 创建一个Runtime实例对象
        Runtime rt = Runtime.getRuntime();
        Process process = null;
// 得到表示进程的Process对象
        try {
           process = rt.exec("calc.exe");
           Thread.sleep(3000);
        }catch (Exception e){
            e.printStackTrace();
        }
        process.destroy();
    }
}
